﻿:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --gray-light: #f5f5f5;
    --gray-medium: #ddd;
    --gray-dark: #777;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-sm: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f9fafc;
}

.navbar {
    background: linear-gradient(135deg, var(--secondary-color), #1a252f);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--light-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

    .logo::before {
        content: "🌧️";
        margin-right: 0.5rem;
        font-size: 1.2em;
    }

.nav-links {
    display: flex;
    list-style: none;
}

    .nav-links li {
        margin-left: 1.5rem;
        position: relative;
    }

    .nav-links a {
        color: var(--light-color);
        text-decoration: none;
        transition: var(--transition);
        font-weight: 500;
        cursor: pointer;
        padding: 0.5rem 0;
        position: relative;
    }

        .nav-links a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: 0;
            left: 0;
            background-color: var(--primary-color);
            transition: var(--transition);
        }

        .nav-links a:hover {
            color: var(--primary-color);
        }

            .nav-links a:hover::after {
                width: 100%;
            }

.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
}

    .hamburger div {
        width: 25px;
        height: 3px;
        background-color: var(--light-color);
        margin: 5px;
        transition: var(--transition);
    }

.content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 76px);
}

/* 首页地图样式 */
#homeContent {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

#main {
    width: 100%;
    height: 700px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* 表单样式 */
.student-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

    .student-form h2 {
        margin-bottom: 1.5rem;
        color: var(--secondary-color);
        text-align: center;
        font-weight: 600;
        position: relative;
        padding-bottom: 0.5rem;
    }

        .student-form h2::after {
            content: '';
            position: absolute;
            width: 60px;
            height: 3px;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            background: var(--primary-color);
        }

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--secondary-color);
    }

    .form-group input {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid var(--gray-medium);
        border-radius: var(--border-radius-sm);
        transition: var(--transition);
        font-size: 1rem;
    }

        .form-group input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

    .submit-btn:hover {
        background-color: #2980b9;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

/* 表格样式 */
#listStudentForm {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

    #listStudentForm h1 {
        margin-bottom: 1.5rem;
        color: var(--secondary-color);
        font-weight: 600;
        text-align: center;
        position: relative;
        padding-bottom: 0.5rem;
    }

        #listStudentForm h1::after {
            content: '';
            position: absolute;
            width: 80px;
            height: 3px;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            background: var(--primary-color);
        }

.refresh-btn {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
     
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .refresh-btn:hover {
        background-color: #27ae60;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

    .refresh-btn::before {
        content: '🔄';
    }

.student-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

    .student-table th {
        background: linear-gradient(to right, var(--primary-color), #2980b9);
        color: white;
        font-weight: 500;
        padding: 1rem;
        text-align: left;
    }

    .student-table td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--gray-medium);
        background-color: white;
    }

    .student-table tr:last-child td {
        border-bottom: none;
    }

    .student-table tr:hover td {
        background-color: var(--gray-light);
    }

.edit-btn, .delete-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    margin-right: 0.5rem;
}

.edit-btn {
    background-color: var(--warning-color);
    color: white;
}

    .edit-btn:hover {
        background-color: #e67e22;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

.delete-btn {
    background-color: var(--danger-color);
    color: white;
}

    .delete-btn:hover {
        background-color: #c0392b;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

.loading {
    text-align: center;
    padding: 2rem;
    font-style: italic;
    color: var(--gray-dark);
    background-color: white;
    border-radius: var(--border-radius-sm);
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.error {
    color: var(--danger-color);
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius-sm);
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 500px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-medium);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-dark);
    transition: var(--transition);
    line-height: 1;
}

    .close-btn:hover {
        color: var(--danger-color);
        transform: rotate(90deg);
    }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    min-width: 80px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background-color: #2980b9;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

.btn-secondary {
    background-color: var(--gray-medium);
    color: var(--dark-color);
}

    .btn-secondary:hover {
        background-color: #bbb;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

/* 消息提示 */
.message-box {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
}

    .message-box.show {
        top: 20px;
        opacity: 1;
    }

    .message-box.success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

        .message-box.success::before {
            content: '✓';
            font-weight: bold;
        }

    .message-box.error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

        .message-box.error::before {
            content: '✗';
            font-weight: bold;
        }



.content > div {
    animation: fadeIn 0.5s ease-out;
}

/* 加载动画 */
.loading::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}
/* 用户菜单样式 */
.user-menu {
    position: relative;
    margin-left: auto;
    padding: 0 30px;
    cursor: pointer;
}

.username {
    color: #fff;
    padding: 15px 0;
    display: block;
}

.logout-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    min-width: 120px;
}

.user-menu:hover .logout-dropdown {
    opacity: 1;
    visibility: visible;
}

.logout-btn {
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #333;
}

    .logout-btn:hover {
        background: #f5f5f5;
    }

/* 新增样式 */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box {
    order: 1; /* 确保搜索框在按钮左侧 */
    width: 200px;
    padding: 8px 12px;
}

.refresh-btn {
    order: 2; /* 确保按钮在搜索框右侧 */
}